<?php 
	require_once("models/config.php");
	require_once("ui.php");
	require_once("stats/db.php");
?>

<?php 
	if (!isUserViewAuthorized()) {
		echo "Unauthorized access";
		die();
	}
?>

<?php printPageHead(null, null); ?>

	<?php printNavigationBar('index', NAVIGATION_ITEM_USER_STATS) ?>		
		
		<div id="content" class="container_16 clearfix">
			<div class="grid_16">
				<?php
					$usedUser = $_GET['userId'];
				
					$reportsStats = new ReportsStats();
					$reportsStats->loadStats($usedUser);
					
					printReports($reportsStats);
				 ?>
			</div>
		</div>

<?php printPageFoot(); ?>
